<?php
require 'smarty/Smarty.class.php';

$obj = new Smarty;

//模板目录
$obj->template_dir='view';

//编译目录
$obj->compile_dir='compile';

$obj->left_delimiter ='{';
$obj->right_delimiter='}';

$obj->assign('time',time());

$obj->assign('html','<h1><i>hello</i></h1>');

$obj->assign('data',['name'=>['a'=>'baidu']]);

$obj->display('index.html');






